/*
 * Copyright (c) 2013, FPX and/or its affiliates. All rights reserved.
 * Use, Copy is subject to authorized license.
 */
package com.sunkey.log.test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.sunkey.log.audit.annotation.Audit;

@Service
public class LogServiceImpl implements LogService {
    
    private final static Logger logger = LoggerFactory.getLogger(LogServiceImpl.class);

    @Override
    @Audit(action = "sayHello")
    public void sayHello(String str) {
       System.out.println("hello " + str);
    }

    @Override
    @Audit(action = "sayHello")
    public void sayHelloForCommon(String str) {
        logger.info("test======");
        System.out.println("hello " + str);
    }

    @Override
    @Audit(action = "sayHello", message="print {$0} {$1}")
    public void sayHello(String str, int sex) {
        System.out.println("hello " + str + ", sex: " + sex);
    }

}
